package main

import (
	"github.com/Depado/ginprom"
	"github.com/gin-gonic/gin"
)

func main() {
	r := gin.Default()

	p := ginprom.New(ginprom.Engine(r), ginprom.Subsystem("gin"), ginprom.Path("/metrics"))

	r.GET("/ping", func(c *gin.Context) {
		c.JSON(200, gin.H{
			"message": "pong",
		})
	})
	r.Use(p.Instrument())

	r.Run(":9998")
}
